let display = document.getElementById("display");

function appendValue(value) {
    display.value += value + " ";
}

function calculate() {
    let result;
    try {
        result = eval(display.value);
    } catch (error) {
        result = "Error";
    }
    display.value += "= " + result;
    display.style.fontWeight = "bold";
    display.style.color = "#ff4040";
}

function clearDisplay() {
    display.value = "";
    display.style.fontWeight = "normal";
    display.style.color = "#000";
}
